package com.deuwise.job.entity;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.util.Date;

/**
 * Copyright
 *
 * @author chenwenchao
 * @date 2019/1/16 0016
 * Description:
 */
@Data
@EqualsAndHashCode(callSuper=true)
@TableName("sys_job_run_log")
public class JobRunLogDo extends Model<JobRunLogDo> implements Serializable{

    @TableField("id")
    @ApiModelProperty("主键id")
    @TableId
    private String id;

    @TableField("job_name")
    @ApiModelProperty("任务名称")
    private  String jobName;


    @TableField("job_id")
    @ApiModelProperty("任务Id")
    private  String jobId;

    @TableField("run_type")
    @ApiModelProperty("运行方式 0 手动,1自动")
    private  Integer runType;


    @TableField("run_time")
    @ApiModelProperty("执行时间")
    private Date runTime;


    @TableField("method_class")
    @ApiModelProperty("执行方法类")
    private  String methodClass;


    @TableField("results")
    @ApiModelProperty("执行结果 0 失败,1成功")
    private  Integer results;

    @TableField("exception")
    @ApiModelProperty("错误信息")
    private  String exception;

    @TableField("next_run_time")
    @ApiModelProperty("下次执行时间")
    private  Date nextRunTime;

    @Override
    protected Serializable pkVal() {
        return id;
    }


}
